package intelligentCustomer.knowledge;

import java.util.HashMap;
import java.util.Map;

/**
 * 产品信息类
 */
public class ProductInfo {
    private String name;
    private String category;
    private int price;
    private Map<String, String> features = new HashMap<>();
    
    /**
     * 构造函数
     * 
     * @param name 产品名称
     * @param category 产品类别
     * @param price 产品价格
     */
    public ProductInfo(String name, String category, int price) {
        this.name = name;
        this.category = category;
        this.price = price;
    }
    
    /**
     * 添加产品特性
     * 
     * @param key 特性名称
     * @param value 特性值
     */
    public void addFeature(String key, String value) {
        this.features.put(key, value);
    }
    
    public String getName() {
        return name;
    }
    
    public String getCategory() {
        return category;
    }
    
    public int getPrice() {
        return price;
    }
    
    public Map<String, String> getFeatures() {
        return features;
    }
} 